if not servertable then servertable = {} end
servertable["translation"] = {}
servertable["translation"]["from"] = {}
servertable["translation"]["to"] = {}

function AddTranslation(internalname,externalname)
	local pos1 = table.getn(servertable["translation"]["from"])
	local pos2 = table.getn(servertable["translation"]["to"])
	if (pos1 != pos2) then
		Msg("!!!Critical Error in Translation Tables!!!")
	else
		servertable["translation"]["from"][pos1 + 1] = internalname
		servertable["translation"]["to"][pos2 + 1] = externalname
	end
end
							
function Translate(totranslate)
	for index,translation in pairs(servertable["translation"]["from"]) do 
		if (translation == totranslate) then
			totranslate = servertable["translation"]["to"][index]
		end
	end
	return totranslate
end

function TranslateBack(fromtranslate)
	for index,translation in pairs(servertable["translation"]["to"]) do 
		if (translation == fromtranslate) then
			fromtranslate = servertable["translation"]["from"][index]
		end
	end
	return fromtranslate
end
